package de.jmda.gen.java;

import java.lang.annotation.Annotation;

import javax.lang.model.element.Name;
import javax.validation.constraints.NotNull;

import de.jmda.gen.GeneratorException;

public interface ClassGenerator extends CompilationUnitTypeGenerator
{
	@NotNull String getClassName() throws GeneratorException;
	void setClassName(@NotNull String className);
	void setClassName(@NotNull Name className);

	StringBuffer getExtendsClause() throws GeneratorException;
	void setExtendsClause(String extendsClause);
	void setExtendsClause(StringBuffer extendsClause);
	void setExtendsClause(Class<?> extendsClause);

	StringBuffer getImplementsClause() throws GeneratorException;
	void setImplementsClause(String implementsClause);

	boolean isAbstract();
	void setAbstract(boolean isAbstract);

	/**
	 * @return content of main method body
	 * @throws GeneratorException
	 */
	String getMainMethod() throws GeneratorException;

	/**
	 * @param string content of main method body
	 */
	void setMainMethod(String string);
	
	void addAnnotation(Class<? extends Annotation> anntotation, StringBuffer parameters);
	void addMethodGenerator(MethodGenerator generator);
	void addMethodGenerator(InstanceMethodGenerator generator);
	void addMethodGenerator(StaticMethodGenerator generator);
	void addFieldGenerator(FieldGenerator generator);
	void addFieldGenerator(InstanceFieldGenerator generator);
	void addFieldGenerator(StaticFieldGenerator generator);
}